#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Volume.h>
#include <VolumeUnit.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Volume)
{
    TEST(should be able to compare 1 OZ equals 3 TSP)
    {
        ASSERT_TRUE(Volume(1, OZ) == Volume(3, TSP));
    }

    TEST(should be able to compare 1 TSP equals 4 TBSP)
    {
        ASSERT_TRUE(Volume(1, TSP) == Volume(4, TBSP));
    }

    TEST(should be able to check equation of same unit)
    {
        ASSERT_TRUE(Volume(1, OZ) != Volume(2, TSP));
        ASSERT_TRUE(Volume(1, TSP) != Volume(5, TBSP));
    }
//New Added CASEs
    TEST(should be able to add two volume equals with big Unit)
    {
        ASSERT_TRUE(Volume(1, TSP) + Volume(4, TBSP) == Volume(2, TSP));
	ASSERT_TRUE(Volume(1, OZ) + Volume(3, TSP) == Volume(2, OZ));
    }

    TEST(should be able to add two lenths equals with small Unit)
    {
        ASSERT_TRUE(Volume(1, TSP) + Volume(4, TBSP) == Volume(8, TBSP));
	ASSERT_TRUE(Volume(1, OZ) + Volume(3, TSP) == Volume(6, TSP));
    }

    TEST(should be able to add two lenths not equals another length)
    {
        ASSERT_TRUE(Volume(1, TSP) + Volume(4, TBSP) != Volume(3, TSP));
	ASSERT_TRUE(Volume(1, OZ) + Volume(3, TSP) != Volume(5, TSP));
    }
//New Added Test CASE for new Volume Unit, it should compile error
    TEST(should not be able to compare 2 yard equals 1 meter)
    {
	static VolumeUnit cube(6);
        ASSERT_TRUE(Volume(2, OZ) == Volume(1,cube));
    }
};

